package com.rp.system.corn.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.rp.system.corn.entity.QuartzJob;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface JobMapper {

    IPage<QuartzJob> pageJob(IPage<QuartzJob> page, @Param("jobName") String jobName);

    List<QuartzJob> listJob();

    List<QuartzJob> listJobByGroup(@Param("jobGroup") String jobGroup);

    QuartzJob getJob(@Param("jobName") String jobName, @Param("jobGroup") String jobGroup);

    int saveJob(QuartzJob job);

    int updateJobStatus(@Param("jobName") String jobName, @Param("jobGroup") String jobGroup, @Param("status") String status);

    int removeQuartzJob(@Param("jobName") String jobName, @Param("jobGroup") String jobGroup);

    int updateJob(QuartzJob quartz);
}
